/**
 * 
 */
$(document).ready(function() {
	setSize();
})
function setSize() {
	var windowheight = $(window).height();
	var documentheight = $('body').innerHeight();
	var minheight = 400;
	var resizeheight = windowheight - documentheight + 400;
	if (resizeheight > minheight) {
		$(".content .left .left-panel").css("height", resizeheight + "px");
		$(".content .right .right-panel").css("height", resizeheight + "px");
	} else {
		$(".content .left .left-panel").css("height", minheight + "px");
		$(".content .right .right-panel").css("height", minheight + "px");
	}
}

var winHeight = $(window).height();
$(window).resize(function(){
	var resizeTimeout;
    //New height
    winNewHeight = $(window).height();
    var cont = true;
    // compare the new height with old one
    if(winHeight!=winNewHeight)
    {
        window.clearTimeout(resizeTimeout);
        resizeTimeout = window.setTimeout(setSize, 150);
    }
    //Update the height
    winHeight = winNewHeight;
});